<?php
class Seat
{
	var $seatID = "";
	var $userID = "";
	var $ready = false;
	var $nextSeatID = "";
	var $prevSeatID = "";
	var $cardList = array();
	var $uno = false;
	function __toString()
	{
		return '{"seatID":"'.$this->seatID.'","userID":"'.$this->userID.'","ready":"'.$this->ready.'","prevSeatID":"'.$this->prevSeatID.'","nextSeatID":"'.$this->nextSeatID.'","uno":"'.$this->uno.'"}';
	}

	function ready()
	{
		$this->ready = empty($this->ready);
		return $this->ready;
	}
	
	function isWin()
	{
		return $this->uno && count($this->cardList) == 0;
	}
}//end of class Seat